<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            /* overflow: hidden; */
            /* 创建一个 BFC */
            border: 1px solid #000;
        }

        .item {
            float: left;
            width: 50%;
            height: 100px;
            border: 1px solid pink;
            box-sizing: border-box;
        }

        .box::after {
            content: '';
            display: block;
            clear: both;
            border: 1px solid skyblue;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
    </div>
</body>

</html>